]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellDBus: Add a method to reload extensions
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 5 Jun 2012 17:06:40 +0000 (13:06 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 12 Jun 2012 21:16:09 +0000 (17:16 -0400)
A common request from extension developers has been to reload their
extensions without restarting the Shell.

https://bugzilla.gnome.org/show_bug.cgi?id=677586

js/ui/shellDBus.js

index 7a6257766bd45fe4d2b9bc255bc5bb9ea0a0dd6c..66ac9c062a89fde64d2196eb709684b938bd310b 100644 (file)
@@ -67,6 +67,9 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
 <method name="LaunchExtensionPrefs">
     <arg type="s" direction="in" name="uuid"/>
 </method>
+<method name="ReloadExtension">
+    <arg type="s" direction="in" name="uuid"/>
+</method>
 <property name="OverviewActive" type="b" access="readwrite" />
 <property name="ApiVersion" type="i" access="read" />
 <property name="ShellVersion" type="s" access="read" />
@@ -269,6 +272,11 @@ const GnomeShell = new Lang.Class({
                    ['extension:///' + uuid], -1, null);
     },
 
+    ReloadExtension: function(uuid) {
+        ExtensionSystem.unloadExtension(uuid);
+        ExtensionSystem.loadExtension(uuid);
+    },
+
     get OverviewActive() {
         return Main.overview.visible;
     },